package edu.pku.sei.transformation.engine;

import java.util.HashMap;
import java.util.Set;

public class EngineRegister {
	public static EngineRegister INSTANCE = new EngineRegister();
	HashMap<String, IEngineAdapter> engines = new HashMap<String, IEngineAdapter>();

	private EngineRegister() {

	}

	public static EngineRegister getRegister() {
		return INSTANCE;
	}

	public void registEngine(IEngineAdapter engine) {
		this.engines.put(engine.getID(), engine);
	}

	public Set<String> getIDs() {
		return engines.keySet();
	}

	public IEngineAdapter getEngine(String id) {
		return engines.get(id);
	}

}
